<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>API_ghhp.InicioSesion</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="API_ghhp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="API_ghhp-module.html">Module&nbsp;API_ghhp</a> ::
        Class&nbsp;InicioSesion
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/API_ghhp.InicioSesion-class.html">hide&nbsp;private</a>]</font></td></tr>
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="API_ghhp.InicioSesion-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class InicioSesion</h2>

<hr/>

Esta clase es la que va a permitir ejecuar el msj_inicio_sesion. 
Dependiendo del usuario, es la interfaz que se va a mostrar:
<ol start="1">
  <li>
    Interfaz Mesa de Ayuda.
  </li>
  <li>
    Interfaz Grupo de Resolucion.
  </li>
  <li>
    Interfaz Gerencia.
  </li>
</ol>
<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="API_ghhp.InicioSesion-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Setea el gladefile, obtiene el widget msj_inico_sesion</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="API_ghhp.InicioSesion-class.html#run" class="summary-sig-name"><code>run</code></a>()</span></code>
<br />
Falta comentar.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="API_ghhp.InicioSesion-class.html#verificar" class="summary-sig-name"><code>verificar</code></a>()</span></code>
<br />
Obtiene el nombre de usuario y el password del usuario y realiza una 
consulta a la BD para consultar si el usuario existe.</td></tr>
</table><br />


<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Method Details</th></tr>
</table>

<a name="__init__"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>)</span>
    <br /><i>(Constructor)</i>
  </h3>
  Setea el gladefile, obtiene el widget msj_inico_sesion
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="run"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">run</span>()</span>
  </h3>
  Falta comentar.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="verificar"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">verificar</span>()</span>
  </h3>
  Obtiene el nombre de usuario y el password del usuario y realiza una 
  consulta a la BD para consultar si el usuario existe. De ser asi le 
  pregunta a que grupo pertenece para devolver ese valor.
<pre class="doctestblock">
<span class="py-src"><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> lib.database <span class="py-keyword">import</span> Usuario
<span class="py-prompt">&gt;&gt;&gt; </span>opciones = {<span class="py-string">'MesaDeAyuda'</span>:1, <span class="py-string">'GrupoDeResolucion'</span>:2, <span class="py-string">'Gerencia'</span>:3}
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">try</span>:
<span class="py-prompt">... </span>    resultado = Usuario.selectBy(u_legajo = user, password = pased)[0]
<span class="py-prompt">... </span><span class="py-keyword">except</span> IndexError, error:
<span class="py-prompt">... </span>    <span class="py-keyword">return</span> -1, None
<span class="py-prompt">...
</span><span class="py-prompt">&gt;&gt;&gt; </span>opcion = resultado.grupo_de_resolucion_.nombre
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">return</span> opciones[opcion],resultado</span></pre>
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="API_ghhp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" width="100%"></th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Wed Dec  5 08:20:23 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
